package com.xxcloud.common.search;

public enum LocalSortOrder {

    ASC(0, "升序"),

    DESC(1, "降序");

    private int type;

    private String value;

    public Integer getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    private LocalSortOrder(int type, String value) {
        this.type = type;
        this.value = value;
    }

    public static LocalSortOrder valueOf(Integer value) {
        if (value == null) {
            return null;
        }
        for (LocalSortOrder sortOrder : LocalSortOrder.values()) {
            if (sortOrder.getType().equals(value)) {
                return sortOrder;
            }
        }
        return null;
    }

}
